package com.dwxt.cdms.dao.oufu;

import com.dwxt.cdms.applets.dto.IndexGraphDayResDTO;
import com.dwxt.cdms.applets.dto.IndexGraphResDTO;
import com.dwxt.cdms.applets.dto.IndexReqDTO;
import com.dwxt.cdms.entity.oufu.OuFuData;
import com.dwxt.cdms.entity.oufu.OuFuDataExample;
import com.dwxt.cdms.entity.vo.OuFuDataVO;
import com.dwxt.cdms.view.wristwatch.NewSleepDataView;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface OuFuDataMapper {
    long countByExample(OuFuDataExample example);

    int deleteByExample(OuFuDataExample example);

    int deleteByPrimaryKey(Integer id);

    int insert(OuFuData record);

    int insertSelective(OuFuData record);

    List<OuFuData> selectByExample(OuFuDataExample example);

    OuFuData selectByPrimaryKey(Integer id);

    int updateByExampleSelective(@Param("record") OuFuData record, @Param("example") OuFuDataExample example);

    int updateByExample(@Param("record") OuFuData record, @Param("example") OuFuDataExample example);

    int updateByPrimaryKeySelective(OuFuData record);

    int updateByPrimaryKey(OuFuData record);

    List<OuFuDataVO> selectGroup(@Param("name") String name, @Param("type") String type,Integer stationId);

    List<Integer> selectCustomerIdsBySleepData(@Param("name") String name);

    NewSleepDataView selectSleepDataViewByNewestAndCustomerId(Integer customerId);

    List<OuFuData> selectPage(@Param("customerId") Integer customerId, @Param("type") String type);

    List<OuFuData> selectOuFuGraph(@Param("customerId") Integer customerId, @Param("type") String type);

    List<IndexGraphResDTO> selectGraphWithDate(IndexReqDTO indexReqDTO);

    List<IndexGraphDayResDTO> selectGraphWithDay(IndexReqDTO indexReqDTO);

    List<IndexGraphResDTO> selectStepDateEveryDay(IndexReqDTO indexReqDTO);

    List<IndexGraphDayResDTO> selectTempDateEveryDay(IndexReqDTO indexReqDTO);

    List<OuFuData> selectCustomerOufu(String customerId, Integer scope,String type);

    List<OuFuData> selectSleepRangeRecord(@Param("customerId")Integer customerId,
                                          @Param("sleep")String sleep,
                                          @Param("startTime")String startTime,
                                          @Param("endTime")String endTime);
}